package com.chukun.gateway.http.controller;

import com.chukun.gateway.client.anno.ApiInvoker;
import com.chukun.gateway.client.anno.ApiService;
import com.chukun.gateway.client.enums.ApiProtocol;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author chukun
 * @version 1.0.0
 * @description http的Controller示例
 * @createTime 2023/11/26 20:38
 */
@Slf4j
@RestController
@ApiService(serviceId = "gateway-backend-http-server", protocol = ApiProtocol.HTTP, patternPath = "/http-server/**")
public class HttpServerController {

    @ApiInvoker(path = "/http-server/ping")
    @GetMapping("/http-server/ping")
    public String ping() {
        log.info("HttpServerController.ping.execute....");
        return "pong";
    }
}
